home *** CD-ROM | disk | FTP | other *** search
Wrap
OPT PREPROCESS MODULE 'graphics/gfx','graphics/gfxmacros','graphics/text','graphics/rastport','graphics/regions', 'intuition/intuition', 'feelin','libraries/feelin','a4' PROC main() DEF c,w,str,txt, myback[16]:STRING,mycursor[16]:STRING,mycursor2[16]:STRING,myblink[16]:STRING, upstr sys_SGlob() -> Save E Global base StringF(myback,'F:\h\0',{drawfunc}) StringF(mycursor,'F:\h\0',{drawcursor}) StringF(mycursor2,'F:\h\0',{drawcursor2}) StringF(myblink,'F:\h\0',{drawblink}) upstr := '`SsYea baby !!' IF feelinbase := OpenLibrary('feelin.library',FV_VERSION) c := ClientObject, Child, w := WindowObject, FA_Window_Title, 'Feelin : String', Child, Page, FA_Group_PageTitles, ['Examples','Custom','Notification'], Child, VGroup, Child, BarTitle('Numeric string'), Child, FO_String, FA_String_MaxLen,32, FA_String_Accept,{__Num}, FA_String_Integer, 1234, End, Child, BarTitle('Hexadecimal string'), Child, FO_String, FA_String_MaxLen,80, FA_String_Accept,{__Hex}, End, Child, BarTitle('Alphabetic string'), Child, FO_String, FA_String,{__Str}, FA_String_MaxLen,80, FA_String_Reject,{__Num}, FA_String_Format,FV_String_Left, End, Child, FO_String, FA_String,{__Str}, FA_String_MaxLen,80, FA_String_Reject,{__Num}, FA_String_Format,FV_String_Center, End, Child, FO_String, FA_String,{__Str}, FA_String_MaxLen,80, FA_String_Reject,{__Num}, FA_String_Format,FV_String_Right, End, End, Child, VGroup, FA_FixedHeight,TRUE, Child, F_NewObjA(FC_String,[ StringFrame, StringBack, FA_Font,'Garnet/16', FA_String, {__Str}, FA_String_Format, FV_String_Left, End, Child, F_NewObjA(FC_String,[ StringFrame, FA_Back, myback, FA_Font,'Times/36', FA_String, {__Str}, FA_String_Format, FV_String_Center, FA_String_BlinkSpeed, 5, FA_String_TextActive, 'c:0044DD', FA_String_TextInactive, 'c:00277F', FA_String_TextCursor, 'c:0066EE', FA_String_Cursor, mycursor, FA_String_Blink, myblink, End, Child, F_NewObjA(FC_String,[ StringFrame, FA_Back, myback, FA_Font, 'Diamond/20', FA_String, {__Str}, FA_String_Format, FV_String_Right, FA_String_Cursor, mycursor2, FA_String_TextCursor, 's:4', End, End, Child, VGroup, Child, TextObject, FA_Fixed,TRUE, DontChain, FA_Text,'`j`Ss`<0>All modifications done in the\nStringObject below will be\nreported to the TextObject.\n\nYou can enter formating codes to\nadjust text. Remember the special\nchar is `<8>```<0>. `Sg(``c will center text)`Sn', End, Child, str := String_(upstr,80), Child, txt := TextObject, GaugeFrame, DontChain, FA_Inner,[3,2,3,2]:CHAR,FA_Font,FP_Font_Big, FA_FixedHeight,TRUE, FA_Text_Static,TRUE, FA_Text_PreParse,'`l`n`Sn`<0>', FA_Text,upstr, End, End, End, End, End IF c F_DoA(str,FM_Notify,[FA_String,FV_Notify_Always,txt,3,FM_Set,FA_Text,FV_Notify_Value]) F_DoA(w,FM_Notify,[FA_Window_CloseRequest,TRUE,FV_Notify_Client,2,FM_Client_ReturnID,FV_Client_Quit]) F_Set(w,FA_Window_Open,TRUE) WHILE F_DoA(c,FM_Client_WaitEvent,NIL) <> FV_Client_Quit DO NOP F_DisposeObj(c) ENDIF CloseLibrary(feelinbase) ELSE WriteF('Unable to open feelin.library\n') ENDIF ENDPROC PROC drawfunc(render=A0:PTR TO feelinRender,region=A2:PTR TO feelinRect) sys_RGlob() drawstri(render.rport,region,render.pens[FV_Pen_Fill],render.pens[FV_Pen_HalfShadow]) ENDPROC PROC drawcursor(render=A0:PTR TO feelinRender,rect=A1:PTR TO feelinRect,region=A2) DEF x1,y1,x2,y2,rp, ap,bp,cp sys_RGlob() x1 := rect.x1 ; x2 := rect.x2 y1 := rect.y1 ; y2 := rect.y2 ; rp := render.rport ap := render.pens[FV_Pen_Shine] bp := render.pens[FV_Pen_Shadow] cp := render.pens[FV_Pen_HalfShine] drawstri(rp,region,ap,cp) _APen(ap) ; _Move(x1+1,y2) ; _Draw(x2,y2) ; _Draw(x2,y1+1) _APen(bp) ; _Move(x1,y2-1) ; _Draw(x1,y1) ; _Draw(x2-1,y1) ENDPROC PROC drawcursor2(render=A0:PTR TO feelinRender,region=A2:PTR TO feelinRect) sys_RGlob() drawstri(render.rport,region,render.pens[FV_Pen_Shine],render.pens[FV_Pen_HalfShine]) ENDPROC PROC drawblink(render=A0:PTR TO feelinRender,rect=A1:PTR TO feelinRect,region=A2) DEF x1,y1,x2,y2,rp, ap,bp,cp sys_RGlob() x1 := rect.x1 ; x2 := rect.x2 y1 := rect.y1 ; y2 := rect.y2 ; rp := render.rport ap := render.pens[FV_Pen_HalfShine] bp := render.pens[FV_Pen_HalfDark] cp := render.pens[FV_Pen_Fill] drawstri(rp,region,ap,cp) _APen(ap) ; _Move(x1+1,y2) ; _Draw(x2,y2) ; _Draw(x2,y1+1) _APen(bp) ; _Move(x1,y2-1) ; _Draw(x1,y1) ; _Draw(x2-1,y1) ENDPROC PROC drawstri(rp:PTR TO rastport,rect:PTR TO feelinRect,a,b) DEF x1,y1,x2,y2,x3,pt pt := [%1111111100000000,%0111111110000000,%0011111111000000,%0001111111100000, %0000111111110000,%0000011111111000,%0000001111111100,%0000000111111110, %0000000011111111,%1000000001111111,%1100000000111111,%1110000000011111, %1111000000001111,%1111100000000111,%1111110000000011,%1111111000000001]:INT x1 := rect.x1 ; x3 := rect.x2 ; x2 := x3 - x1 / 3 + x1 y1 := rect.y1 ; y2 := rect.y2 SetAfPt(rp,pt,4) _APen(a) _BPen(b) _Boxf(x2+1,y1,x3,y2) SetAfPt(rp,[-1,-1],2) _APen(b) _Boxf(x1,y1,x2,y2) ENDPROC __Hex: CHAR 'ABCDEFabcdef' __Num: CHAR '0123456789',0 __Str: CHAR 'Lotan is my lord',0